<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>
    <c:choose>
		<c:when test="${success == 1}">支付成功</c:when>
		<c:otherwise>支付失败</c:otherwise>
	</c:choose>
    </title>
    
    <script src="<%=basePath%>js/fontSize.js"></script>
    <script src="<%=basePath%>js/jquery-1.11.3.min.js"></script>
    
    <link rel="stylesheet" href="<%=basePath%>css/style.css"/>
    <link rel="stylesheet" href="<%=basePath%>css/style2.css"/>
    <style>
      body{
        background: #fff;
      }
    </style>
</head>

<body>
  <div class="payment-head pay-success-head">
    <div class="payment-img ">
	    <c:choose>
			<c:when test="${success == 1}"><img src="<%=basePath%>images/pay_success.png"></c:when>
			<c:otherwise><img src="<%=basePath%>images/pay_error.png"></c:otherwise>
		</c:choose>
    </div>
    <c:choose>
		<c:when test="${success == 1}">
			<p class="pay-success-green">${msg}</p>
		</c:when>
		<c:otherwise>
			<p class="pay-success-red">${msg}</p>
		</c:otherwise>
	</c:choose>
    
    <c:if test="${success == 1}">
    	<p>${shopName}收到转账</p>
		<h2>¥：${coin_num}</h2>
    </c:if>
  </div>

  <button class="evaluate-release pay-success" onclick="aa()">完成</button>
  <script src="js/style.js"></script>
  <script type="text/javascript">
  	function aa(){
  		var ctx = "${pageContext.request.contextPath}";
  		window.location.href = ctx+"/index";
  	}
  </script>
  
</body>
</html>